/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package hxg.portmgr.core.oper.snmp.record;

/**
 *
 * @author hxg
 */
 public enum BandWidthMode {
    Bps{
        @Override
        public float bpsTransToThis(float f) {
            return f/8;
        }
        
        @Override
        public String chsName(){
            return "字节每秒";
        }
    }, bps{
        @Override
        public float bpsTransToThis(float f) {
            return f;
        }
        
        @Override
        public String chsName(){
            return "比特每秒";
        }
    }, KBps{
        @Override
        public float bpsTransToThis(float f) {
            return f/(1024*8);
        }
        
        @Override
        public String chsName(){
            return "千字节每秒";
        }
    }, Kbps{
        @Override
        public float bpsTransToThis(float f) {
            return f/1024;
        }
        
        @Override
        public String chsName(){
            return "千比特每秒";
        }
    }, MBps{
        @Override
        public float bpsTransToThis(float f) {
            return f/(1024*1024*8);
        }
        
        @Override
        public String chsName(){
            return "兆字节每秒";
        }
    }, Mbps{
        @Override
        public float bpsTransToThis(float f) {
            return f/(1024*1024);
        }
        
        @Override
        public String chsName(){
            return "兆比特每秒";
        }
    };
    
    
    public abstract float bpsTransToThis(float f);
    
    public abstract String chsName();
}
